
<loading ng-if="vmAlarm.loading"></loading>
<div class="mod-option">
  <div class="pull-right right-option"><span ng-cloak="ng-cloak">共{{alarmsListFiltered.length}}个报警</span>
    <input type="text" placeholder="输入关键词查询" ng-model="vmAlarm.keywords" class="ui-input-search ui-input-fill"/>
  </div>
  <p class="txt-prompt alarm-prompt">删除报警需要报警组DEVELOPER以上权限</p>
</div>
<div class="mod-list">
  <loading ng-if="vmAlarm.isLoading"></loading>
  <table class="ui-table-dome">
    <thead>
      <tr>
        <th>报警对象</th>
        <th>报警类型</th>
        <th>报警指标</th>
        <th>报警数值</th>
        <th>报警次数</th>
        <th>报警时间</th>
        <th ng-if="vm.permission.role&amp;&amp;vm.permission.role!='REPORTER'">操作</th>
      </tr>
    </thead>
    <tbody>
      <tr ng-if="alarmsListFiltered.length==0">
        <td colspan="7">无相关信息</td>
      </tr>
      <tr ng-repeat="tpl in alarmsListFiltered=(vmAlarm.alarmsList|alarmFilter:vmAlarm.keywords)">
        <td><span ng-bind="tpl.alarmObject" ng-mouseenter="vmAlarm.changePopover(tpl)" popover-template="'currentAlarmPopover.html'" popover-trigger="mouseenter"></span></td>
        <td ng-bind="tpl.templateTypeName"></td>
        <td ng-bind="tpl.metricName"></td>
        <td ng-bind="tpl.alarmNum"></td>
        <td ng-bind="tpl.alarmTimes"></td>
        <td ng-bind="tpl.timeStamp|date:'yyyy-MM-dd HH:mm:ss'"></td>
        <td ng-if="vm.permission.role&amp;&amp;vm.permission.role!='REPORTER'"><a ng-click="vmAlarm.ignoreAlarm(tpl.id)" class="icon-delete"></a></td>
      </tr>
    </tbody>
  </table>
</div>
<script type="text/ng-template" id="currentAlarmPopover.html">
  <div ng-bind-html="currentAlarmPopoverHtml"></div>
</script>